# 上传jar包到服务器
ssh root@192.168.6.116  -> aigcProject1024 1234 39.98.44.8
scp E:/project/chatgpt/chatgpt-data-emitter/chatgpt-data-app/target/chatgpt-data-app.jar  root@192.168.6.116:/root/chatgpt/chatgpt-data
nohup java -jar /root/chatgpt/chatgpt-data/chatgpt-data.jar > chatgpt.log 2>&1 &

# 上传 jar, Dockerfile, build.sh start.sh 到虚拟机
scp E:/project/chatgpt/chatgpt-data-emitter/chatgpt-data-app/target/chatgpt-data-app.jar  root@192.168.6.116:/root/chatgpt/chatgpt-data
scp E:/project/chatgpt/chatgpt-data-emitter/chatgpt-data-app/Dockerfile  root@192.168.6.116:/root/chatgpt/chatgpt-data
scp E:/project/chatgpt/chatgpt-data-emitter/chatgpt-data-app/build.sh  root@192.168.6.116:/root/chatgpt/chatgpt-data/build.sh
scp E:/project/chatgpt/chatgpt-data-emitter/chatgpt-data-app/start.sh  root@192.168.6.116:/root/chatgpt/chatgpt-data/start.sh

# 上传 jar, Dockerfile, build.sh start.sh 到云服务器
ssh -i C:/Users/86187/.ssh/root.pem root@39.98.44.8
# 自动输入密码
scp -i C:/Users/86187/.ssh/root.pem E:/project/chatgpt/chatgpt-data-emitter/chatgpt-data-app/target/chatgpt-data-app.jar  root@39.98.44.8:/root/chatgpt/chatgpt-data
scp -i C:/Users/86187/.ssh/root.pem E:/project/chatgpt/chatgpt-data-emitter/chatgpt-data-app/Dockerfile  root@39.98.44.8:/root/chatgpt/chatgpt-data
scp -i C:/Users/86187/.ssh/root.pem E:/project/chatgpt/chatgpt-data-emitter/chatgpt-data-app/build.sh  root@39.98.44.8:/root/chatgpt/chatgpt-data/build.sh
scp -i C:/Users/86187/.ssh/root.pem E:/project/chatgpt/chatgpt-data-emitter/chatgpt-data-app/start.sh  root@39.98.44.8:/root/chatgpt/chatgpt-data/start.sh

ssh root@39.98.44.8 -> lijiaqinag12@

# 给文件权限
chmod +x /root/chatgpt/chatgpt-data/build.sh
chmod +x /root/chatgpt/chatgpt-data/start.sh
chmod +x /root/chatgpt/chatgpt-data/Dockerfile
# 运行文件, 必须要进入该目录才行!!!
# shellcheck disable=SC2164
cd /root/chatgpt/chatgpt-data
/root/chatgpt/chatgpt-data/build.sh
/root/chatgpt/chatgpt-data/start.sh
# 查看日志
docker logs -f chatgpt-data-app-1.3

# 代理
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890

unset http_proxy
unset https_proxy
echo $http_proxy
echo $https_proxy

http://624036bb.r21.cpolar.top # niginx - 80端口

systemctl start ss-server
systemctl status ss-server
systemctl stop ss-server
systemctl enable ss-server

# 启动服务
systemctl start kcptun
systemctl status kcptun
systemctl stop kcptun
systemctl enable kcptun


/root/clash/start.sh
source /etc/profile.d/clash.sh
proxy_on




# docker 代理
mkdir -p /etc/systemd/system/docker.service.d
touch /etc/systemd/system/docker.service.d/http-proxy.conf
vim /etc/systemd/system/docker.service.d/http-proxy.conf

[Service]
Environment="HTTP_PROXY=http://127.0.0.1:7890/"
Environment="HTTPS_PROXY=http://127.0.0.1:7890/"

sudo systemctl daemon-reload
sudo systemctl restart docker


# yum
# 果你想确保下载的源是国外的，可以手动添加 EPEL 源的国外镜像地址。在 /etc/yum.repos.d/ 下创建或编辑 epel.repo 文件并指定国外源。例如：

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://dl.fedoraproject.org/pub/epel/7/$basearch
enabled=1
gpgcheck=0

sudo yum --disablerepo="*" --enablerepo="epel" install redis



# nginx -》 将配置上传到服务器后，执行
docker run \
--name Nginx \
-p 80:80 \
-v /root/NginxConfig/nginx/logs:/var/log/nginx \
-v /root/NginxConfig/nginx/html:/usr/share/nginx/html \
-v /root/NginxConfig/nginx/conf/nginx.conf:/etc/nginx/nginx.conf \
-v /root/NginxConfig/nginx/conf/conf.d:/etc/nginx/conf.d \
-v /root/NginxConfig/nginx/ssl:/etc/nginx/ssl/ \
--privileged=true -d --restart=always nginx

# 2-8服务器
# 116.198.239.101